// <editor-fold defaultstate="collapsed" desc="Đừng Quan tâm"> 
package gui.tiemchung;

import com.toedter.calendar.JDateChooser;
import gui.event.tiemchung.TCChiTietDlg_event;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextField;

public class TCChiTiet_Dialog extends javax.swing.JDialog {
    private List<JButton> listButtons;

    public TCChiTiet_Dialog(JDialog parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(parent);
        listButtons = new ArrayList<JButton>();
        listButtons.add(btnSuaChiTiet);

    }
//</editor-fold> 
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlThongTinChiTietHoSoTiemChung = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        txtMaTC = new javax.swing.JTextField();
        txtTenVatNuoi = new javax.swing.JTextField();
        txtBenh = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        txtTrangThai = new javax.swing.JTextField();
        btnSuaHoSo = new javax.swing.JButton();
        jDateChooserNgayBatDau = new com.toedter.calendar.JDateChooser();
        jDateChooserNgayKetThuc = new com.toedter.calendar.JDateChooser();
        pnlVatNuoi = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblTiemChung = new javax.swing.JTable();
        btnClose = new javax.swing.JButton();
        btnIn = new javax.swing.JButton();
        btnSuaChiTiet = new javax.swing.JButton();
        btnThem = new javax.swing.JButton();
        btnSuaChiTiet1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Thông Tin Chi Tiết Hồ Sơ Tiêm Chủng");

        pnlThongTinChiTietHoSoTiemChung.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thông tin hồ sơ tiêm chủng", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 204)));
        pnlThongTinChiTietHoSoTiemChung.setLayout(new java.awt.BorderLayout());

        jPanel1.setPreferredSize(new java.awt.Dimension(580, 103));

        jLabel1.setText("Mã tiêm chủng");

        jLabel2.setText("Tên vật nuôi");

        jLabel3.setText("Bệnh");

        txtMaTC.setEditable(false);
        txtMaTC.setText("VN-TC_01");

        txtTenVatNuoi.setEditable(false);
        txtTenVatNuoi.setText("Cún");

        txtBenh.setEditable(false);
        txtBenh.setText("Dại");

        jLabel4.setText("Ngày bắt đầu");

        jLabel6.setText("Ngày kết thúc");

        jLabel5.setText("Trạng thái");

        txtTrangThai.setEditable(false);
        txtTrangThai.setText("Chưa kết thúc");

        btnSuaHoSo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 edit.png"))); // NOI18N
        btnSuaHoSo.setText("Sửa...");
        btnSuaHoSo.setToolTipText("Sửa Thông Tin Khách Hàng");
        btnSuaHoSo.setPreferredSize(new java.awt.Dimension(79, 25));
        btnSuaHoSo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuaHoSoActionPerformed(evt);
            }
        });

        jDateChooserNgayBatDau.setEnabled(false);

        jDateChooserNgayKetThuc.setEnabled(false);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel1)))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(txtTenVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel6))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(txtMaTC, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(txtBenh, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtTrangThai, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                    .addComponent(jDateChooserNgayBatDau, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jDateChooserNgayKetThuc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(96, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnSuaHoSo, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtMaTC)
                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jDateChooserNgayBatDau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtTenVatNuoi)
                            .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jDateChooserNgayKetThuc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtTrangThai))
                    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtBenh, javax.swing.GroupLayout.Alignment.LEADING))
                .addGap(18, 18, 18)
                .addComponent(btnSuaHoSo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlThongTinChiTietHoSoTiemChung.add(jPanel1, java.awt.BorderLayout.LINE_START);

        pnlVatNuoi.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Chi tiết phiếu tiêm chủng", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 204)));
        pnlVatNuoi.setLayout(new java.awt.BorderLayout());

        tblTiemChung.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {"VN-TC_01_1", "Cún", "19/04/2014", "19/04/2015", "19,000VND"},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Mã phiếu tiêm chủng", "Vaccine", "Ngày tiêm", "Ngày tiêm kế tiếp", "Số tiền"
            }
        ));
        tblTiemChung.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tblTiemChung.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tblTiemChungFocusGained(evt);
            }
        });
        jScrollPane1.setViewportView(tblTiemChung);
        if (tblTiemChung.getColumnModel().getColumnCount() > 0) {
            tblTiemChung.getColumnModel().getColumn(0).setMinWidth(100);
        }

        pnlVatNuoi.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Close-16.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        btnIn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Printer-16.png"))); // NOI18N
        btnIn.setText("In...");
        btnIn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInActionPerformed(evt);
            }
        });

        btnSuaChiTiet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 edit.png"))); // NOI18N
        btnSuaChiTiet.setText("Sửa");
        btnSuaChiTiet.setEnabled(false);
        btnSuaChiTiet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuaChiTietActionPerformed(evt);
            }
        });

        btnThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 addnew.png"))); // NOI18N
        btnThem.setText("Thêm");
        btnThem.setToolTipText("");
        btnThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemActionPerformed(evt);
            }
        });

        btnSuaChiTiet1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-16 delete.png"))); // NOI18N
        btnSuaChiTiet1.setText("Xóa");
        btnSuaChiTiet1.setEnabled(false);
        btnSuaChiTiet1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuaChiTiet1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnSuaChiTiet, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnSuaChiTiet1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnIn, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(pnlVatNuoi, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlThongTinChiTietHoSoTiemChung, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnIn, btnSuaChiTiet, btnThem});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlThongTinChiTietHoSoTiemChung, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnClose)
                    .addComponent(btnIn)
                    .addComponent(btnSuaChiTiet)
                    .addComponent(btnThem)
                    .addComponent(btnSuaChiTiet1))
                .addContainerGap())
        );

        pnlThongTinChiTietHoSoTiemChung.getAccessibleContext().setAccessibleName("Thông Tin Hồ Sơ Khách Hàng");

        pack();
    }// </editor-fold>//GEN-END:initComponents
// <editor-fold defaultstate="collapsed" desc="Event"> 
    private void tblTiemChungFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tblTiemChungFocusGained
        TCChiTietDlg_event.tblVatNuoiFocusGained(this.listButtons);
    }//GEN-LAST:event_tblTiemChungFocusGained

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        TCChiTietDlg_event.btnCloseActionPerformed(this);
    }//GEN-LAST:event_btnCloseActionPerformed

    private void btnInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInActionPerformed
        TCChiTietDlg_event.btnInActionPerformed(tblTiemChung);
    }//GEN-LAST:event_btnInActionPerformed

    private void btnSuaChiTietActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuaChiTietActionPerformed
        TCChiTietDlg_event.btnSuaChiTietActionPerformed(this, true);
    }//GEN-LAST:event_btnSuaChiTietActionPerformed


    private void btnThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemActionPerformed
        TCChiTietDlg_event.btnThemActionPerformed(this, true);
    }//GEN-LAST:event_btnThemActionPerformed

    private void btnSuaHoSoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuaHoSoActionPerformed
        TCChiTietDlg_event.btnSuaHoSoActionPerformed(this, true);
    }//GEN-LAST:event_btnSuaHoSoActionPerformed

    private void btnSuaChiTiet1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuaChiTiet1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSuaChiTiet1ActionPerformed
//</editor-fold> 
    public JTable getTblTiemChung(){
        return tblTiemChung;
    }

    public JDateChooser getjDateChooserNgayBatDau() {
        return jDateChooserNgayBatDau;
    }

    public JDateChooser getjDateChooserNgayKetThuc() {
        return jDateChooserNgayKetThuc;
    }

    public JTextField getTxtBenh() {
        return txtBenh;
    }

    public JTextField getTxtTenVatNuoi() {
        return txtTenVatNuoi;
    }

    public JTextField getTxtMaTC() {
        return txtMaTC;
    }

    public JTextField getTxtTrangThai() {
        return txtTrangThai;
    }
    
    
// <editor-fold defaultstate="collapsed" desc="Các Component">
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnIn;
    private javax.swing.JButton btnSuaChiTiet;
    private javax.swing.JButton btnSuaChiTiet1;
    private javax.swing.JButton btnSuaHoSo;
    private javax.swing.JButton btnThem;
    private com.toedter.calendar.JDateChooser jDateChooserNgayBatDau;
    private com.toedter.calendar.JDateChooser jDateChooserNgayKetThuc;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnlThongTinChiTietHoSoTiemChung;
    private javax.swing.JPanel pnlVatNuoi;
    private javax.swing.JTable tblTiemChung;
    private javax.swing.JTextField txtBenh;
    private javax.swing.JTextField txtMaTC;
    private javax.swing.JTextField txtTenVatNuoi;
    private javax.swing.JTextField txtTrangThai;
    // End of variables declaration//GEN-END:variables
//</editor-fold> 
}
